#include <stdio.h>
#include <stdlib.h>

#include "SDL/SDL.h"

#undef main
int main(int argc, char *argv[])
{
    printf("hello\n");
    //声明表面
    SDL_Surface* hello = NULL;
    SDL_Surface* screen = NULL;

    //启动SDL
    SDL_Init( SDL_INIT_EVERYTHING );

    //设置窗口
    screen = SDL_SetVideoMode( 640, 480, 32, SDL_SWSURFACE );

    //加载图像
    hello = SDL_LoadBMP( "../lesson01/fdsf.bmp" );

    if(hello == NULL) exit(-1);

    //将图像应用到窗口上
    SDL_BlitSurface( hello, NULL, screen, NULL );

    //更新窗口
    SDL_Flip( screen );

    //暂停
    SDL_Delay( 2000 );
    exit(0);
}
